namespace NAct.Tests.Support
{
	using Attributes;
	using NUnit.Framework;

	public class PiCalculation
	{
		private double result;

		[ When( "(?<left>[0-9]+) is divided by (?<right>[0-9]+)" ) ]
		public void Divide( int left, int right )
		{
			result = left / (double) right;
		}

		[ Then( @"the result should be (?<value>[0-9]+\.[0-9]+)" ) ]
		public void ConfirmResult( double value )
		{
			Assert.AreEqual( value, result, 0.002d, "Accept 3.14..." );
		}
	}
}